
public abstract class animal {

	
	
	//variables
	String name;
	boolean isAlive;
	int age;
	int size;
	boolean isHungry;
	
	//constructor
	public animal(boolean isALive, int age, int size, boolean isHungry){
		
		//this.name = name;
		this.isAlive=isAlive;
		this.age=age;
		this.size=size;
		this.isHungry=isHungry;
		
		
	}
	
	//methods
	
	public boolean hitWithTruck(){
		
		isAlive=false;
		return isAlive;
		
		
	}
	
	
	public int grow(){
		
		age+=1;
		size+=1;
		
		return age;
		
	}
	
	public boolean feed(){
		
		isHungry=false;
		return isHungry;
		
	}
	
	public String toString(){
		
		return name+age+isAlive+isHungry+size;
		
	}
	
	
	
	
	
}
